<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>KityMinder Example</title>

  <link href="favicon.ico" type="image/x-icon" rel="shortcut icon">
  <link rel="stylesheet" href="src/kityminder.css" rel="stylesheet">

  <style type="text/css">
    body {
      margin: 0;
      padding: 0;
    }

    #minder-view {
      position: absolute;
      border: 1px solid #ccc;
      left: 10px;
      top: 10px;
      bottom: 10px;
      right: 10px;
      width: 100%;
      height: 100%;
    }
  </style>

  <script type="text/javascript" src="node_modules/kity/dist/kity.js"></script>
</head>

<body>
  <script id="minder-view" type="application/kityminder" minder-data-type="json">
      {
      "template": "custom",
            "theme": "custom-blue",
            "root": {
                "data": {
                    "color": "#000000",
                    "background": "white",
                    "text": "主板",
                    "nodeType": 1
                },
                "children": [
                    {
                        "data": {
                            "color": "#006400",
                            "background": "white",
                            "text": "主频大于4.5GHZ",
                            "nodeType": 4,
                            "forceBorder": true,
                            "direction": "right"
                        },
                        "children": [
                            {
                                "data": {
                                    "background": "white",
                                    "text": "电源IC",
                                    "nodeType": 2,
                                    "direction": "right"
                                },
                                "children": [
                                    {
                                        "data": {
                                            "color": "#006400",
                                            "background": "white",
                                            "text": "功能5",
                                            "nodeType": 4,
                                            "forceBorder": true,
                                            "direction": "down"
                                        },
                                        "children": []
                                    }
                                ]
                            },
                            {
                                "data": {
                                    "background": "white",
                                    "text": "电源IC",
                                    "nodeType": 2,
                                    "direction": "right"
                                },
                                "children": [
                                    {
                                        "data": {
                                            "color": "#006400",
                                            "background": "white",
                                            "text": "功能6",
                                            "nodeType": 4,
                                            "forceBorder": true,
                                            "direction": "down"
                                        },
                                        "children": []
                                    }
                                ]
                            },
                            {
                                "data": {
                                    "background": "white",
                                    "text": "南桥-电源(物理连接)",
                                    "forceBorder": true,
                                    "nodeType": 10,
                                    "direction": "right"
                                },
                                "children": [
                                    {
                                        "data": {
                                            "color": "#006400",
                                            "background": "white",
                                            "text": "测试功能3",
                                            "nodeType": 4,
                                            "forceBorder": true,
                                            "direction": "down"
                                        },
                                        "children": []
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "data": {
                            "color": "#006400",
                            "background": "white",
                            "text": "功耗低于65W",
                            "nodeType": 4,
                            "forceBorder": true,
                            "direction": "right"
                        },
                        "children": [
                            {
                                "data": {
                                    "background": "white",
                                    "text": "显卡-电源IC(物理连接)",
                                    "nodeType": 11,
                                    "forceBorder": true,
                                    "direction": "right"
                                },
                                "children": [
                                    {
                                        "data": {
                                            "color": "#006400",
                                            "background": "white",
                                            "text": "功能7",
                                            "nodeType": 4,
                                            "forceBorder": true,
                                            "direction": "down"
                                        },
                                        "children": []
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "data": {
                            "background": "white",
                            "text": "邱垠茗的测试数据2",
                            "nodeType": 2,
                            "direction": "left"
                        },
                        "children": [
                            {
                                "data": {
                                    "color": "#006400",
                                    "background": "white",
                                    "text": "功能12",
                                    "nodeType": 4,
                                    "forceBorder": true,
                                    "direction": "down"
                                },
                                "children": []
                            },
                            {
                                "data": {
                                    "color": "#006400",
                                    "background": "white",
                                    "text": "功能1",
                                    "nodeType": 4,
                                    "forceBorder": true,
                                    "direction": "down"
                                },
                                "children": []
                            }
                        ]
                    }
                ]
            }
          }
    </script>
</body>

<!-- *************************** Module 形式加载引入 **************************** -->
<script type="text/javascript" src="node_modules/seajs/dist/sea-debug.js"></script>
<script type="text/javascript">
  /* global seajs */
  seajs.config({
    base: './src'
  });
  define('start', function (require) {
    var Minder = require('kityminder').Minder;

    // 创建 km 实例
    var km = window.km = new Minder();
    km.setup('#minder-view');
  });
  seajs.use('start');
</script>

</html>